package com.yuwen.yuwenRPC.fault;

import com.yuwen.yuwenRPC.spi.SpiLoader;

/**
 * @ClassNameRetry
 * @Description TODO
 * @Author钰玟
 * @Date2025/4/6 上午10:52
 * @Version 1.0
 **/

public class RetryStrategyFactory {
    static{
        SpiLoader.load(RetryStrategy.class);
    }

    /**
     * 默认重试机制
     */
    private static final RetryStrategy DEFAULT_RETRY_STRATEGY = new FixedIntervalRetryStrategy();


    /**
     * 获取实例
     * @param key 实例键名
     * @return  重试机制实例
     */
    public static RetryStrategy getInstance(String key){
        return SpiLoader.getInstance(RetryStrategy.class, key);
    }



}
